home *** CD-ROM | disk | FTP | other *** search
- /* err: */
- /* is used to locate the errors within */
- /* the c source from the aztecc.err file. */
- trace o
- parse arg pfk line
-
- options results
- 'status d'
- fms = result
- if fms ~= '' & right(fms,1) ~= ':'
- then fms = fms'/'
- 'status f'
- fns = upper(result)
- fils = fms''fns
- if pos('.A68',fils) ~= 0
- then asm = 1
- else asm = 0
-
- 'cmd 0'
- 'cmd 1'
- 'window 0,0,640,170'
-
- if pfk = '' then pfk = 6
- if line = '' then line = 1
-
- if open('file1','AztecC.err','read') = 0
- then do
- 'macro' pfk 'err' pfk 1
- 'msg No error message file found'
- exit
- end
-
- do i = 1 to line
- string = readln('file1')
- end
-
- if eof('file1')
- then do
- 'macro' pfk 'err' pfk 1
- 'msg No more error messages'
- exit
- end
-
- if asm
- then do
- parse value string with 'File "'fn'"'.'Line'ln lit errnum':'errmsg
- fm = ''
- end
- else do
- parse value string with fn':'ln':'col':'errnum':'errmsg':'lit
- if (datatype(ln,'n') = 0)
- then do
- parse value string with fm':'fn':'ln':'col':'errnum':'errmsg':'lit
- if fm ~= ''
- then fn = fm':'fn
- end
- end
-
- fn = reverse(fn)
- parse upper value fn with fn'/'fm
- if fm ~= '' then fm = '/'fm
- parse value fn with fn':'fm2
- fn = reverse(fn)
- fm2 = reverse(fm2)
- fm = reverse(fm)
- if fm ~= '' & fm2 ~= ''
- then fm = fm2':'fm
-
- if fns ~= fn
- then do
- 'SAVEAS'
- 'LOAD' fm||fn
- end
- 'JU' ln col
- line = line + 1
- close('file1')
- 'macro' pfk 'err' pfk line
- 'MSG "'LIT'" ='errnum'='errmsg
-